com.supermap.ar
Class ArObject
- java.lang.Object
-
- com.supermap.ar.ArObject
-
- Direct Known Subclasses:
- GeoObject
public class ArObject extends java.lang.Object
ArObject class This is the base class of AR objects. It includes methods of basic properties of AR objects.
-
-
Constructor Summary
Constructors Constructor and Description ArObject()
Constructor for creating objectsArObject(long id)
Creates AR objects which are with unique ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Point3D
getAngle()
Gets the angles of axises x, y, and z.Point3D
getBottomLeft()
Gets the bottom-left corner of ArObjectPoint3D
getBottomRight()
Gets the bottom-right corner of ArObjectdouble
getDistanceFromUser()
Gets the distance between ArObject and the user in meterlong
getId()
Gets ArObject IDjava.lang.String
getInfo()
Gets object descriptionjava.lang.String
getName()
Gets the name of ArObjectPoint3D
getPosition()
Gets the position of ArObjectPoint3D
getTopLeft()
Gets the top-left corner of ArObjectPoint3D
getTopRight()
Gets the top-right corner of ArObjectboolean
isVisible()
Returns whether to display objectsvoid
setAngle(float x, float y, float z)
Sets anglesvoid
setAngle(Point3D newAngle)
Sets anglesvoid
setDistanceFromUser(double distance)
Sets the distance between ArObject and the user in metervoid
setInfo(java.lang.String info)
Sets object informationvoid
setName(java.lang.String name)
Sets the name of ArObjectvoid
setPosition(float x, float y, float z)
Sets the position of ArObjectvoid
setPosition(Point3D newPos)
Sets the position of ArObjectvoid
setVisible(boolean visible)
Sets the visibility of ArObject.
-
-
-
Constructor Detail
-
ArObject
public ArObject(long id)
Creates AR objects which are with unique ID.- Parameters:
id
- ID
-
ArObject
public ArObject()
Constructor for creating objects
-
-
Method Detail
-
getId
public long getId()
Gets ArObject ID- Returns:
- Gets ArObject ID
-
setInfo
public void setInfo(java.lang.String info)
Sets object information- Parameters:
info
- description
-
getInfo
public java.lang.String getInfo()
Gets object description- Returns:
- description
-
getAngle
public Point3D getAngle()
Gets the angles of axises x, y, and z.- Returns:
- returns the angles of axises x, y, and z.
-
setAngle
public void setAngle(float x, float y, float z)
Sets angles- Parameters:
x
- rotation of axis xy
- rotation of axis yz
- rotation of axis z
-
setAngle
public void setAngle(Point3D newAngle)
Sets angles- Parameters:
newAngle
- includes raotation information on coordinates x, y, and z
-
getPosition
public Point3D getPosition()
Gets the position of ArObject- Returns:
- Return coordinates of 3D objects
-
setPosition
public void setPosition(Point3D newPos)
Sets the position of ArObject- Parameters:
newPos
- 3D points
-
setPosition
public void setPosition(float x, float y, float z)
Sets the position of ArObject- Parameters:
x
- x coordinatey
- y coordinatez
- z coordinate
-
setVisible
public void setVisible(boolean visible)
Sets the visibility of ArObject. True is by default- Parameters:
visible
- Whether to display objects. True means yes. False denotes no
-
isVisible
public boolean isVisible()
Returns whether to display objects- Returns:
- whether to display objects ArObject
-
setName
public void setName(java.lang.String name)
Sets the name of ArObject- Parameters:
name
- Name
-
getName
public java.lang.String getName()
Gets the name of ArObject- Returns:
- Name
-
getDistanceFromUser
public double getDistanceFromUser()
Gets the distance between ArObject and the user in meter- Returns:
- distance
-
setDistanceFromUser
public void setDistanceFromUser(double distance)
Sets the distance between ArObject and the user in meter- Parameters:
distance
- the distance
-
getTopLeft
public Point3D getTopLeft()
Gets the top-left corner of ArObject- Returns:
- the top-left corner of ArObject
-
getBottomLeft
public Point3D getBottomLeft()
Gets the bottom-left corner of ArObject- Returns:
- the bottom-left corner of ArObject
-
getBottomRight
public Point3D getBottomRight()
Gets the bottom-right corner of ArObject- Returns:
- the bottom-right corner of ArObject
-
getTopRight
public Point3D getTopRight()
Gets the top-right corner of ArObject- Returns:
- the top-right corner of ArObject
-
-